﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Data.Objects.DataClasses;
using System.Data.Services.Common;

namespace Service.Model
{
	[DataServiceKey("StateID")]
	[Table("State")]
    [FederationKey("StateID")]
    [FederationRoot]
	public class State
	{
		[Key]
		public Int64 StateID { get; set; }
		public string Name { get; set; }

		[InverseProperty("State")]
		public ICollection<County> Counties { get; set; }

	    [InverseProperty("State")]
        public EntityCollection<City> Cities { get; set; }
	}
}